import unittest
from page.home_page_lcy import Home_Page

class ScreenTestCase(unittest.TestCase):
    @classmethod
    def setUpClass(cls) -> None:
        cls.home = Home_Page(appPackage='com.nearme.gamecenter', appActivity='.ui.activity.SplashActivity')

    def test_01_screen(self):
        self.home.sort_click()
        text1 = self.home.get_app_name()
        self.home.screen_click()
        self.home.order_click()
        text2 = self.home.get_app_name()
        self.assertNotEqual(text1,text2,msg="断言筛选游戏成功")

    @classmethod
    def tearDownClass(cls) -> None:
        cls.home.quit()

if __name__ == '__main__':
    unittest.main(verbosity=2)